Cookers are home appliances for cooking food with electricity or gaseous fuel. Such a cooker includes a heat source for heating food in a cooking chamber. The cooker also includes a temperature sensor or a humidity sensor for sensing temperature or humidity of the cooking chamber. An operation of the heat source is controlled according to temperature or humidity sensed by the temperature sensor or the humidity sensor, thereby facilitating the cooking of the food in the cooking chamber.